<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
    xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/org.elwiki.data/gen-src" modelPluginID="org.elwiki.data"
    modelName="Elwiki_data" rootExtendsInterface="org.eclipse.emf.cdo.CDOObject" rootExtendsClass="org.eclipse.emf.internal.cdo.CDOObjectImpl"
    reflectiveDelegation="true" importerID="org.eclipse.emf.importer.ecore" featureDelegation="Reflective"
    complianceLevel="17.0" copyrightFields="false" providerRootExtendsClass="org.eclipse.emf.cdo.edit.CDOItemProviderAdapter"
    operationReflection="true" runtimePlatform="RCP" importOrganizing="true">
  <foreignModel>elwiki_data.ecore</foreignModel>
  <modelPluginVariables>CDO=org.eclipse.emf.cdo</modelPluginVariables>
  <editPluginVariables>CDO_EDIT=org.eclipse.emf.cdo.edit</editPluginVariables>
  <genPackages prefix="Elwiki_data" basePackage="org" disposableProviderFactory="true"
      ecorePackage="elwiki_data.ecore#/">
    <genDataTypes ecoreDataType="elwiki_data.ecore#//ArrayString"/>
    <genDataTypes ecoreDataType="elwiki_data.ecore#//AccessList"/>
    <genDataTypes ecoreDataType="elwiki_data.ecore#//ListPageContent"/>
    <genClasses ecoreClass="elwiki_data.ecore#//WikiPage">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/id"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/name"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/description"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/alias"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/redirect"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/viewCount"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/pageContents"/>
      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/attachments"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/wiki"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/children"/>
      <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/parent"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/oldParents"/>
      <genFeatures children="true" createChild="true" propertySortChoices="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/pageReferences"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/webLog"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/attributes"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/unknownPages"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/tags"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//WikiPage/pageAcl"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//WikiPage/comments"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/compareTo" body="if (obj instanceof WikiPage) {&#xA;&#x9;WikiPage page = (WikiPage) obj;&#xA;&#x9;String obj1 = this.getName(), obj2 = page.getName();&#xA;&#x9;if (obj1 == null) {&#xA;&#x9;&#x9;return -1;&#xA;&#x9;}&#xA;&#x9;if (obj2 == null) {&#xA;&#x9;&#x9;return 1;&#xA;&#x9;}&#xA;&#x9;if (obj1.equals(obj2)) {&#xA;&#x9;&#x9;return 0;&#xA;&#x9;}&#xA;&#x9;&#x9;return obj1.compareTo(obj2);&#xA;}&#xA;return 0;">
        <genParameters ecoreParameter="elwiki_data.ecore#//WikiPage/compareTo/obj"/>
      </genOperations>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/clone" body="Object o = new Object(); // :FVK:&#xA;return o;&#xA;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getLastModifiedDate"
          body="Date lastModifiedDate;&#xA;&#xA;List&lt;PageContent> contents = new ArrayList&lt;>(this.getPageContents());&#xA;if (contents.size() > 0) {&#xA;&#x9;contents.sort(new Comparator&lt;PageContent>() {&#xA;&#x9;&#x9;@Override&#xA;&#x9;&#x9;public int compare(PageContent o1, PageContent o2) {&#xA;&#x9;&#x9;&#x9;Date date1 = o1.getCreationDate();&#xA;&#x9;&#x9;&#x9;Date date2 = o2.getCreationDate();&#xA;&#x9;&#x9;&#x9;if (date1 != null) {&#xA;&#x9;&#x9;&#x9;&#x9;if (date2 != null)&#xA;&#x9;&#x9;&#x9;&#x9;&#x9;return date1.compareTo(date2);&#xA;&#x9;&#x9;&#x9;&#x9;return 1; // (date2 == null), then date1 > date2. &#xA;&#x9;&#x9;&#x9;} else if (date2 != null) {&#xA;&#x9;&#x9;&#x9;&#x9;return -1;&#xA;&#x9;&#x9;&#x9;}&#xA;&#xA;&#x9;&#x9;&#x9;return 0;&#xA;&#x9;&#x9;}&#xA;&#x9;});&#xA;&#x9;lastModifiedDate = contents.get(contents.size() - 1).getCreationDate();&#xA;} else {&#xA;&#x9;lastModifiedDate = new GregorianCalendar(1972, 2, 12).getTime(); //:FVK: workaround.&#xA;}&#xA;&#xA;return lastModifiedDate;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getAuthor" body="PageContent content = getLastContent();&#xA;return (content != null) ? content.getAuthor() : &quot;&quot;;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getLastContent"
          body="PageContent result = null;&#xA;int version = 0;&#xA;EList&lt;PageContent> attachContents = getPageContents();&#xA;for (PageContent pageContent : attachContents) {&#xA;&#x9;int contentVersion = pageContent.getVersion();&#xA;&#x9;if (version &lt; contentVersion) {&#xA;&#x9;&#x9;version = contentVersion;&#xA;&#x9;&#x9;result = pageContent;&#xA;&#x9;}&#xA;}&#xA;&#xA;return result;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getLastVersion"
          body="PageContent content = getLastContent();&#xA;return (content != null) ? content.getVersion() : 0;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getAttribute" body="return getAttributes().get(name);">
        <genParameters ecoreParameter="elwiki_data.ecore#//WikiPage/getAttribute/name"/>
      </genOperations>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/setAttribute" body="getAttributes().put( name, value );">
        <genParameters ecoreParameter="elwiki_data.ecore#//WikiPage/setAttribute/name"/>
        <genParameters ecoreParameter="elwiki_data.ecore#//WikiPage/setAttribute/value"/>
      </genOperations>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/isInternalPage"
          body="String pageId = this.getId();&#xA;return (pageId.startsWith(&quot;w&quot;))? true : false;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getPageContentsReversed"
          body="List&lt;PageContent> contents = new ArrayList&lt;>(this.getPageContents());&#xA;contents.sort(Comparator.comparing(PageContent::getVersion, Comparator.reverseOrder()));&#xA;&#xA;return contents;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/toString" body="return super.toString() + &quot; &quot; + getId() + &quot;:&quot; + getName();"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getContentText"
          body="String result = &quot;&quot;;&#xA;EList&lt;PageContent> attachContents = getPageContents();&#xA;for (PageContent pageContent : attachContents) {&#xA;&#x9;if (version == pageContent.getVersion()) {&#xA;&#x9;&#x9;result = pageContent.getContent();&#xA;&#x9;&#x9;break;&#xA;&#x9;}&#xA;}&#xA;&#xA;return result;">
        <genParameters ecoreParameter="elwiki_data.ecore#//WikiPage/getContentText/version"/>
      </genOperations>
      <genOperations ecoreOperation="elwiki_data.ecore#//WikiPage/getContentText.1"
          body="String result = &quot;&quot;;&#xA;PageContent lastContent = getLastContent();&#xA;if (lastContent != null) {&#xA;&#x9;result = lastContent.getContent();&#xA;}&#xA;&#xA;return result;"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//PagesStore">
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//PagesStore/wikipages"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PagesStore/mainPageId"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PagesStore/nextPageId"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PagesStore/nextAttachmentId"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//PagesStore/tagslist"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//PageContent">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageContent/content"/>
      <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference elwiki_data.ecore#//PageContent/wikipage"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//PageContent/getLength" body="return getContent().length();"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//PageAttachment">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageAttachment/id"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageAttachment/name"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageAttachment/lastVersion"/>
      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//PageAttachment/wikipage"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//PageAttachment/attachContents"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//PageAttachment/forLastContent"
          body="AttachmentContent result = null;&#xA;int version = 0;&#xA;EList&lt;AttachmentContent> attachContents = getAttachContents();&#xA;for (AttachmentContent attContent : attachContents) {&#xA;&#x9;int contentVersion = attContent.getVersion();&#xA;&#x9;if (version &lt; contentVersion) {&#xA;&#x9;&#x9;version = contentVersion;&#xA;&#x9;&#x9;result = attContent;&#xA;&#x9;}&#xA;}&#xA;&#xA;if (result == null)&#xA;&#x9;return Elwiki_dataFactoryImpl.eINSTANCE.createAttachmentContent();&#xA;&#xA;return result;"/>
      <genOperations ecoreOperation="elwiki_data.ecore#//PageAttachment/forVersionContent"
          body="AttachmentContent result = null;&#xA;EList&lt;AttachmentContent> attachContents = getAttachContents();&#xA;for (AttachmentContent attContent : attachContents) {&#xA;&#x9;if (desiredVersion == attContent.getVersion()) {&#xA;&#x9;&#x9;result = attContent;&#xA;&#x9;&#x9;break;&#xA;&#x9;}&#xA;}&#xA;&#xA;return result;">
        <genParameters ecoreParameter="elwiki_data.ecore#//PageAttachment/forVersionContent/desiredVersion"/>
      </genOperations>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//AttachmentContent">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//AttachmentContent/place"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//AttachmentContent/size"/>
      <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference elwiki_data.ecore#//AttachmentContent/pageAttachment"/>
    </genClasses>
    <genClasses image="false" ecoreClass="elwiki_data.ecore#//Object"/>
    <genClasses image="false" ecoreClass="elwiki_data.ecore#//Comparable">
      <genOperations ecoreOperation="elwiki_data.ecore#//Comparable/compareTo" body="Assert.isTrue(false, &quot;:FVK: Code of compareTo must be implemented.&quot;);&#xA;return 0;">
        <genParameters ecoreParameter="elwiki_data.ecore#//Comparable/compareTo/obj"/>
      </genOperations>
    </genClasses>
    <genClasses image="false" ecoreClass="elwiki_data.ecore#//Cloneable">
      <genOperations ecoreOperation="elwiki_data.ecore#//Cloneable/clone" body="Assert.isTrue(false, &quot;:FVK: Code of clone must be implemented.&quot;);&#xA;Object o = new Object();&#xA;return o;&#xA;"/>
    </genClasses>
    <genClasses image="false" ecoreClass="elwiki_data.ecore#//IHistoryInfo">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//IHistoryInfo/version"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//IHistoryInfo/creationDate"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//IHistoryInfo/author"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//IHistoryInfo/changeNote"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//PageReference">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageReference/pageId"/>
      <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference elwiki_data.ecore#//PageReference/wikipage"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//StringToObjectMap">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//StringToObjectMap/key"/>
      <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//StringToObjectMap/value"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//UnknownPage">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//UnknownPage/pageName"/>
      <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference elwiki_data.ecore#//UnknownPage/wikipage"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//TagsList">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//TagsList/tag"/>
    </genClasses>
    <genClasses ecoreClass="elwiki_data.ecore#//PageAclEntry">
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageAclEntry/allow"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageAclEntry/permission"/>
      <genFeatures createChild="false" ecoreFeature="ecore:EAttribute elwiki_data.ecore#//PageAclEntry/roles"/>
    </genClasses>
  </genPackages>
</genmodel:GenModel>
